/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.matezk.dms.things.model.resp;

import cn.hutool.json.JSONObject;
import cn.matezk.dms.common.config.mybatis.JacksonTypeHandler;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.time.LocalDateTime;

/**
 * 设备事件信息
 *
 * @author 程道林
 * @since 2025/01/06 17:46
 */
@Data
@Schema(description = "设备事件信息")
public class EventResp {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    private String id;

    /**
     * 对应腾讯云事件ID
     */
    @Schema(description = "对应腾讯云事件ID")
    private String eventId;

    /**
     * 对应腾讯云事件类型
     */
    @Schema(description = "对应腾讯云事件类型")
    private String type;

    /**
     * 设备ID
     */
    @Schema(description = "设备ID")
    private String deviceId;

    /**
     * 组织名
     */
    @Schema(description = "组织名")
    private String deptName;

    /**
     * 设备别名
     */
    @Schema(description = "设备别名")
    private String aliasName;

    /**
     * 参数
     */
    @Schema(description = "参数")
    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject params;

    /**
     * 事件时间
     */
    @Schema(description = "事件时间")
    private LocalDateTime eventTime;
}